import numpy as np
def word_count(nums):
    dict={}
    for it in nums:
        if it not in dict: #查看是否存在
            dict[it] = 1
        else: dict[it] += 1
    return dict
def show_sort_dict(set_a,dict_b):
    for it in set_a:
        print(it,":",dict_b[it])

p = np.array([1,2,3,6,5,4,6,6,6,6]) 
print(set(p))
print(word_count(p))
show_sort_dict(set(p),word_count(p))
